/*
 ============================================================================
 @file       : Engine.h
 @author     : Jonathan MERCIER
 @date       : 31 janv. 2010
 @version    : 0.1
 
 @section LICENSE
 Copyright   : GPL v3+
 (c)Jonathan MERCIER (read doc for more information)
 Copyright (C) Author: Jonathan MERCIER 2010

 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.

 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.

  
 @section DESCRIPTION
 Description :  
 ============================================================================
 */

#ifndef ENGINE_H_
#define ENGINE_H_

#include "Event.h"
#include <queue>

namespace engine
{
/**
 * @class Engine
 * definition of Engine object type
 */
class Engine
{
private:
	/**
	 * @var std::queue<Event*> events
	 * @brief store message events in FIFO
	 */
	std::queue< Event* > events;


public:
	/**
	 * @fn Engine()
	 * @brief Constructor Engine
	 */
	Engine();
	/**
	 * @fn ~Engine()
	 * @brief Destructor Engine
	 */
	virtual ~Engine();
	/**
	 * @fn void push (Event &)
	 * @brief Accept message from other engine
	 * @param  &event (Event)
	 */
	void push(Event &);
	/**
	 * @fn processQueue
	 * @brief Work on message queue
	 */
	void processQueue();
	/**
	 * @fn void frame ()
	 * @brief Frame for each engine
	 */
	virtual void frame() = 0;

};

}
#endif /* ENGINE_H_ */
